<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for phplib.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
						<h1>Source for file phplib.php</h1>
<p>Documentation is available at <a href="../Templates/PHPLib/_library---templates---phplib---phplib.php.html">phplib.php</a></p>
<div class="src-code">
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;Templates</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@subpackage</span><span class="src-doc">&nbsp;PHPLib</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a6"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-comm">/*</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-comm">&nbsp;*&nbsp;Session&nbsp;Management&nbsp;for&nbsp;PHP3</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-comm">&nbsp;*&nbsp;(C)&nbsp;Copyright&nbsp;1999-2000&nbsp;NetUSE&nbsp;GmbH</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kristian&nbsp;Koehntopp</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-comm">&nbsp;*&nbsp;$Id:&nbsp;template.inc,v&nbsp;1.12&nbsp;2002/07/11&nbsp;22:29:51&nbsp;richardarcher&nbsp;Exp&nbsp;$</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-comm">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a16"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-comm">/*</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-comm">&nbsp;*&nbsp;Change&nbsp;log&nbsp;since&nbsp;version&nbsp;7.2c</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-comm">&nbsp;*&nbsp;Bug&nbsp;fixes&nbsp;to&nbsp;version&nbsp;7.2c&nbsp;compiled&nbsp;by&nbsp;Richard&nbsp;Archer&nbsp;&lt;rha@juggernaut.com.au&gt;:</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-comm">&nbsp;*&nbsp;(credits&nbsp;given&nbsp;to&nbsp;first&nbsp;person&nbsp;to&nbsp;post&nbsp;a&nbsp;diff&nbsp;to&nbsp;phplib&nbsp;mailing&nbsp;list)</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-comm">&nbsp;*&nbsp;Normalised&nbsp;all&nbsp;comments&nbsp;and&nbsp;whitespace&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-comm">&nbsp;*&nbsp;replaced&nbsp;&quot;$handle&quot;&nbsp;with&nbsp;&quot;$varname&quot;&nbsp;and&nbsp;&quot;$h&quot;&nbsp;with&nbsp;&quot;$v&quot;&nbsp;throughout&nbsp;(from&nbsp;phplib-devel)</span></div></li>
<li><div class="src-line"><a name="a25"></a><span class="src-comm">&nbsp;*&nbsp;added&nbsp;braces&nbsp;around&nbsp;all&nbsp;one-line&nbsp;if&nbsp;statements&nbsp;in:&nbsp;get_undefined,&nbsp;loadfile&nbsp;and&nbsp;halt&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-comm">&nbsp;*&nbsp;set_var&nbsp;was&nbsp;missing&nbsp;two&nbsp;sets&nbsp;of&nbsp;braces&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a27"></a><span class="src-comm">&nbsp;*&nbsp;added&nbsp;a&nbsp;couple&nbsp;of&nbsp;&quot;return&nbsp;true&quot;&nbsp;statements&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-comm">&nbsp;*&nbsp;set_unknowns&nbsp;had&nbsp;&quot;keep&quot;&nbsp;as&nbsp;default&nbsp;instead&nbsp;of&nbsp;&quot;remove&quot;&nbsp;(from&nbsp;phplib-devel)</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-comm">&nbsp;*&nbsp;set_file&nbsp;failed&nbsp;to&nbsp;check&nbsp;for&nbsp;empty&nbsp;strings&nbsp;if&nbsp;passed&nbsp;an&nbsp;array&nbsp;of&nbsp;filenames&nbsp;(phplib-devel)</span></div></li>
<li><div class="src-line"><a name="a30"></a><span class="src-comm">&nbsp;*&nbsp;remove&nbsp;@&nbsp;from&nbsp;call&nbsp;to&nbsp;preg_replace&nbsp;in&nbsp;subst&nbsp;--&nbsp;report&nbsp;errors&nbsp;if&nbsp;there&nbsp;are&nbsp;any&nbsp;(NickM)</span></div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-comm">&nbsp;*&nbsp;set_block&nbsp;unnecessarily&nbsp;required&nbsp;a&nbsp;newline&nbsp;in&nbsp;the&nbsp;template&nbsp;file&nbsp;(Marc&nbsp;Tardif)</span></div></li>
<li><div class="src-line"><a name="a32"></a><span class="src-comm">&nbsp;*&nbsp;pparse&nbsp;now&nbsp;calls&nbsp;this-&gt;finish&nbsp;to&nbsp;replace&nbsp;undefined&nbsp;vars&nbsp;(Layne&nbsp;Weathers)</span></div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-comm">&nbsp;*&nbsp;get_var&nbsp;now&nbsp;checks&nbsp;for&nbsp;unset&nbsp;varnames&nbsp;(NickM&nbsp;&amp;&nbsp;rha)</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-comm">&nbsp;*&nbsp;get_var&nbsp;when&nbsp;passed&nbsp;an&nbsp;array&nbsp;used&nbsp;the&nbsp;array&nbsp;key&nbsp;instead&nbsp;of&nbsp;the&nbsp;value&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-comm">&nbsp;*&nbsp;get_vars&nbsp;now&nbsp;uses&nbsp;a&nbsp;call&nbsp;to&nbsp;get_var&nbsp;rather&nbsp;than&nbsp;this-&gt;varvals&nbsp;to&nbsp;prevent&nbsp;undefined&nbsp;var&nbsp;warning&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a36"></a><span class="src-comm">&nbsp;*&nbsp;in&nbsp;finish,&nbsp;the&nbsp;replacement&nbsp;string&nbsp;referenced&nbsp;an&nbsp;unset&nbsp;variable&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a37"></a><span class="src-comm">&nbsp;*&nbsp;loadfile&nbsp;would&nbsp;try&nbsp;to&nbsp;load&nbsp;a&nbsp;file&nbsp;if&nbsp;the&nbsp;varval&nbsp;had&nbsp;been&nbsp;set&nbsp;to&nbsp;&quot;&quot;&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a38"></a><span class="src-comm">&nbsp;*&nbsp;in&nbsp;get_undefined,&nbsp;only&nbsp;match&nbsp;non-whitespace&nbsp;in&nbsp;variable&nbsp;tags&nbsp;as&nbsp;in&nbsp;finish&nbsp;(Layne&nbsp;Weathers&nbsp;&amp;&nbsp;rha)</span></div></li>
<li><div class="src-line"><a name="a39"></a><span class="src-comm">&nbsp;*&nbsp;more&nbsp;elegant&nbsp;fix&nbsp;to&nbsp;the&nbsp;problem&nbsp;of&nbsp;subst&nbsp;stripping&nbsp;'$n',&nbsp;'\n'&nbsp;and&nbsp;'\\'&nbsp;strings&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a40"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a41"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a42"></a><span class="src-comm">&nbsp;*&nbsp;Changes&nbsp;in&nbsp;functionality&nbsp;which&nbsp;go&nbsp;beyond&nbsp;bug&nbsp;fixes:</span></div></li>
<li><div class="src-line"><a name="a43"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a44"></a><span class="src-comm">&nbsp;*&nbsp;changed&nbsp;debug&nbsp;handling&nbsp;so&nbsp;set,&nbsp;get&nbsp;and&nbsp;internals&nbsp;can&nbsp;be&nbsp;tracked&nbsp;separately&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a45"></a><span class="src-comm">&nbsp;*&nbsp;added&nbsp;debug&nbsp;statements&nbsp;throughout&nbsp;to&nbsp;track&nbsp;most&nbsp;function&nbsp;calls&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a46"></a><span class="src-comm">&nbsp;*&nbsp;debug&nbsp;output&nbsp;contained&nbsp;raw&nbsp;HTML&nbsp;--&nbsp;is&nbsp;now&nbsp;escaped&nbsp;with&nbsp;htmlentities&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a47"></a><span class="src-comm">&nbsp;*&nbsp;Alter&nbsp;regex&nbsp;in&nbsp;set_block&nbsp;to&nbsp;remove&nbsp;more&nbsp;whitespace&nbsp;around&nbsp;BEGIN/END&nbsp;tags&nbsp;to&nbsp;improve&nbsp;HTML&nbsp;layout&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a48"></a><span class="src-comm">&nbsp;*&nbsp;Add&nbsp;&quot;append&quot;&nbsp;option&nbsp;to&nbsp;set_var,&nbsp;works&nbsp;just&nbsp;like&nbsp;append&nbsp;in&nbsp;parse&nbsp;(dale&nbsp;at&nbsp;linuxwebpro.com,&nbsp;rha)</span></div></li>
<li><div class="src-line"><a name="a49"></a><span class="src-comm">&nbsp;*&nbsp;Altered&nbsp;parse&nbsp;so&nbsp;that&nbsp;append&nbsp;is&nbsp;honored&nbsp;if&nbsp;passed&nbsp;an&nbsp;array&nbsp;(Brian)</span></div></li>
<li><div class="src-line"><a name="a50"></a><span class="src-comm">&nbsp;*&nbsp;Converted&nbsp;comments&nbsp;and&nbsp;documentation&nbsp;to&nbsp;phpdoc&nbsp;style&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-comm">&nbsp;*&nbsp;Added&nbsp;clear_var&nbsp;to&nbsp;set&nbsp;the&nbsp;value&nbsp;of&nbsp;variables&nbsp;to&nbsp;&quot;&quot;&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-comm">&nbsp;*&nbsp;Added&nbsp;unset_var&nbsp;to&nbsp;usset&nbsp;variables&nbsp;(rha)</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a54"></a><span class="src-comm">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a55"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a56"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a57"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;template&nbsp;class&nbsp;allows&nbsp;you&nbsp;to&nbsp;keep&nbsp;your&nbsp;HTML&nbsp;code&nbsp;in&nbsp;some&nbsp;external&nbsp;files</span></div></li>
<li><div class="src-line"><a name="a58"></a><span class="src-doc">&nbsp;*&nbsp;which&nbsp;are&nbsp;completely&nbsp;free&nbsp;of&nbsp;PHP&nbsp;code,&nbsp;but&nbsp;contain&nbsp;replacement&nbsp;fields.</span></div></li>
<li><div class="src-line"><a name="a59"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;class&nbsp;provides&nbsp;you&nbsp;with&nbsp;functions&nbsp;which&nbsp;can&nbsp;fill&nbsp;in&nbsp;the&nbsp;replacement&nbsp;fields</span></div></li>
<li><div class="src-line"><a name="a60"></a><span class="src-doc">&nbsp;*&nbsp;with&nbsp;arbitrary&nbsp;strings.&nbsp;These&nbsp;strings&nbsp;can&nbsp;become&nbsp;very&nbsp;large,&nbsp;e.g.&nbsp;entire&nbsp;tables.</span></div></li>
<li><div class="src-line"><a name="a61"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a62"></a><span class="src-doc">&nbsp;*&nbsp;Note:&nbsp;If&nbsp;you&nbsp;think&nbsp;that&nbsp;this&nbsp;is&nbsp;like&nbsp;FastTemplates,&nbsp;read&nbsp;carefully.&nbsp;It&nbsp;isn't.</span></div></li>
<li><div class="src-line"><a name="a63"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a64"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a66"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a67"></a><span class="src-doc">&nbsp;*&nbsp;Enter&nbsp;description&nbsp;here...</span></div></li>
<li><div class="src-line"><a name="a68"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a69"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;Templates</span></div></li>
<li><div class="src-line"><a name="a70"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@subpackage</span><span class="src-doc">&nbsp;PHPLib</span></div></li>
<li><div class="src-line"><a name="a71"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a72"></a><span class="src-key">class&nbsp;</span><a href="../Templates/PHPLib/Template.html">Template</a></div></li>
<li><div class="src-line"><a name="a73"></a><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a74"></a>&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a75"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Serialization&nbsp;helper,&nbsp;the&nbsp;name&nbsp;of&nbsp;this&nbsp;class.</span></div></li>
<li><div class="src-line"><a name="a76"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a77"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc-type">string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a78"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a79"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a80"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../Templates/PHPLib/Template.html#var$classname">$classname</a>&nbsp;=&nbsp;<span class="src-str">&quot;Template&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a83"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Determines&nbsp;how&nbsp;much&nbsp;debugging&nbsp;output&nbsp;Template&nbsp;will&nbsp;produce.</span></div></li>
<li><div class="src-line"><a name="a84"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;a&nbsp;bitwise&nbsp;mask&nbsp;of&nbsp;available&nbsp;debug&nbsp;levels:</span></div></li>
<li><div class="src-line"><a name="a85"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;0&nbsp;=&nbsp;no&nbsp;debugging</span></div></li>
<li><div class="src-line"><a name="a86"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;1&nbsp;=&nbsp;debug&nbsp;variable&nbsp;assignments</span></div></li>
<li><div class="src-line"><a name="a87"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;2&nbsp;=&nbsp;debug&nbsp;calls&nbsp;to&nbsp;get&nbsp;variable</span></div></li>
<li><div class="src-line"><a name="a88"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;4&nbsp;=&nbsp;debug&nbsp;internals&nbsp;(outputs&nbsp;all&nbsp;function&nbsp;calls&nbsp;with&nbsp;parameters).</span></div></li>
<li><div class="src-line"><a name="a89"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a90"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Note:&nbsp;setting&nbsp;$this-&gt;debug&nbsp;=&nbsp;true&nbsp;will&nbsp;enable&nbsp;debugging&nbsp;of&nbsp;variable</span></div></li>
<li><div class="src-line"><a name="a91"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;assignments&nbsp;only&nbsp;which&nbsp;is&nbsp;the&nbsp;same&nbsp;behaviour&nbsp;as&nbsp;versions&nbsp;up&nbsp;to&nbsp;release&nbsp;7.2d.</span></div></li>
<li><div class="src-line"><a name="a92"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a93"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc-type">int&nbsp;</span></div></li>
<li><div class="src-line"><a name="a94"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a95"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../Templates/PHPLib/Template.html#var$debug">$debug</a>&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a99"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;The&nbsp;base&nbsp;directory&nbsp;from&nbsp;which&nbsp;template&nbsp;files&nbsp;are&nbsp;loaded.</span></div></li>
<li><div class="src-line"><a name="a100"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a101"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc-type">string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a102"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a103"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_root</span></div></li>
<li><div class="src-line"><a name="a104"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a105"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../Templates/PHPLib/Template.html#var$root">$root</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-str">&quot;.&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a106"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a107"></a>&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a108"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;A&nbsp;hash&nbsp;of&nbsp;strings&nbsp;forming&nbsp;a&nbsp;translation&nbsp;table&nbsp;which&nbsp;translates&nbsp;variable&nbsp;names</span></div></li>
<li><div class="src-line"><a name="a109"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;into&nbsp;names&nbsp;of&nbsp;files&nbsp;containing&nbsp;the&nbsp;variable&nbsp;content.</span></div></li>
<li><div class="src-line"><a name="a110"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;$file[varname]&nbsp;=&nbsp;&quot;filename&quot;;</span></div></li>
<li><div class="src-line"><a name="a111"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a112"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc-type">array&nbsp;</span></div></li>
<li><div class="src-line"><a name="a113"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a114"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_file</span></div></li>
<li><div class="src-line"><a name="a115"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a116"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../Templates/PHPLib/Template.html#var$file">$file</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a118"></a>&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a119"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;A&nbsp;hash&nbsp;of&nbsp;strings&nbsp;forming&nbsp;a&nbsp;translation&nbsp;table&nbsp;which&nbsp;translates&nbsp;variable&nbsp;names</span></div></li>
<li><div class="src-line"><a name="a120"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;into&nbsp;regular&nbsp;expressions&nbsp;for&nbsp;themselves.</span></div></li>
<li><div class="src-line"><a name="a121"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;$varkeys[varname]&nbsp;=&nbsp;&quot;/varname/&quot;</span></div></li>
<li><div class="src-line"><a name="a122"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a123"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc-type">array&nbsp;</span></div></li>
<li><div class="src-line"><a name="a124"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a125"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_var</span></div></li>
<li><div class="src-line"><a name="a126"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a127"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../Templates/PHPLib/Template.html#var$varkeys">$varkeys</a>&nbsp;&nbsp;=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a128"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a129"></a>&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a130"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;A&nbsp;hash&nbsp;of&nbsp;strings&nbsp;forming&nbsp;a&nbsp;translation&nbsp;table&nbsp;which&nbsp;translates&nbsp;variable&nbsp;names</span></div></li>
<li><div class="src-line"><a name="a131"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;into&nbsp;values&nbsp;for&nbsp;their&nbsp;respective&nbsp;varkeys.</span></div></li>
<li><div class="src-line"><a name="a132"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;$varvals[varname]&nbsp;=&nbsp;&quot;value&quot;</span></div></li>
<li><div class="src-line"><a name="a133"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a134"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc-type">array&nbsp;</span></div></li>
<li><div class="src-line"><a name="a135"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a136"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_var</span></div></li>
<li><div class="src-line"><a name="a137"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a138"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../Templates/PHPLib/Template.html#var$varvals">$varvals</a>&nbsp;&nbsp;=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a139"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a140"></a>&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a141"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Determines&nbsp;how&nbsp;to&nbsp;output&nbsp;variable&nbsp;tags&nbsp;with&nbsp;no&nbsp;assigned&nbsp;value&nbsp;in&nbsp;templates.</span></div></li>
<li><div class="src-line"><a name="a142"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a143"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc-type">string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a144"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a145"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_unknowns</span></div></li>
<li><div class="src-line"><a name="a146"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a147"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../Templates/PHPLib/Template.html#var$unknowns">$unknowns</a>&nbsp;=&nbsp;<span class="src-str">&quot;remove&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a148"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a149"></a>&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a150"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Determines&nbsp;how&nbsp;Template&nbsp;handles&nbsp;error&nbsp;conditions.</span></div></li>
<li><div class="src-line"><a name="a151"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;&quot;yes&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;the&nbsp;error&nbsp;is&nbsp;reported,&nbsp;then&nbsp;execution&nbsp;is&nbsp;halted</span></div></li>
<li><div class="src-line"><a name="a152"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;&quot;report&quot;&nbsp;&nbsp;&nbsp;=&nbsp;the&nbsp;error&nbsp;is&nbsp;reported,&nbsp;then&nbsp;execution&nbsp;continues&nbsp;by&nbsp;returning&nbsp;&quot;false&quot;</span></div></li>
<li><div class="src-line"><a name="a153"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;&quot;no&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;errors&nbsp;are&nbsp;silently&nbsp;ignored,&nbsp;and&nbsp;execution&nbsp;resumes&nbsp;reporting&nbsp;&quot;false&quot;</span></div></li>
<li><div class="src-line"><a name="a154"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a155"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc-type">string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a156"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a157"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;halt</span></div></li>
<li><div class="src-line"><a name="a158"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a159"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../Templates/PHPLib/Template.html#var$halt_on_error">$halt_on_error</a>&nbsp;&nbsp;=&nbsp;<span class="src-str">&quot;yes&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a160"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a161"></a>&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a162"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;The&nbsp;last&nbsp;error&nbsp;message&nbsp;is&nbsp;retained&nbsp;in&nbsp;this&nbsp;variable.</span></div></li>
<li><div class="src-line"><a name="a163"></a><span class="src-doc">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a164"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc-type">string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a165"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@access</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a166"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;halt</span></div></li>
<li><div class="src-line"><a name="a167"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a168"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../Templates/PHPLib/Template.html#var$last_error">$last_error</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a169"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a170"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a171"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Class&nbsp;constructor.&nbsp;May&nbsp;be&nbsp;called&nbsp;with&nbsp;two&nbsp;optional&nbsp;parameters.</span></div></li>
<li><div class="src-line"><a name="a172"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;The&nbsp;first&nbsp;parameter&nbsp;sets&nbsp;the&nbsp;template&nbsp;directory&nbsp;the&nbsp;second&nbsp;parameter</span></div></li>
<li><div class="src-line"><a name="a173"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;sets&nbsp;the&nbsp;policy&nbsp;regarding&nbsp;handling&nbsp;of&nbsp;unknown&nbsp;variables.</span></div></li>
<li><div class="src-line"><a name="a174"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a175"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;Template([string&nbsp;$root&nbsp;=&nbsp;&quot;.&quot;],&nbsp;[string&nbsp;$unknowns&nbsp;=&nbsp;&quot;remove&quot;])</span></div></li>
<li><div class="src-line"><a name="a176"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a177"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path&nbsp;to&nbsp;template&nbsp;directory</span></div></li>
<li><div class="src-line"><a name="a178"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;what&nbsp;to&nbsp;do&nbsp;with&nbsp;undefined&nbsp;variables</span></div></li>
<li><div class="src-line"><a name="a179"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_root</span></div></li>
<li><div class="src-line"><a name="a180"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_unknowns</span></div></li>
<li><div class="src-line"><a name="a181"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a182"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span></div></li>
<li><div class="src-line"><a name="a183"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a184"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodTemplate">Template</a><span class="src-sym">(</span><span class="src-var">$root&nbsp;</span>=&nbsp;<span class="src-str">&quot;.&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$unknowns&nbsp;</span>=&nbsp;<span class="src-str">&quot;remove&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a185"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a186"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;Template:&lt;/b&gt;&nbsp;root&nbsp;=&nbsp;<span class="src-var">$root</span>,&nbsp;unknowns&nbsp;=&nbsp;<span class="src-var">$unknowns</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a187"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a188"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_root">set_root</a><span class="src-sym">(</span><span class="src-var">$root</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a189"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_unknowns">set_unknowns</a><span class="src-sym">(</span><span class="src-var">$unknowns</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a190"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a191"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a192"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a193"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a194"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Checks&nbsp;that&nbsp;$root&nbsp;is&nbsp;a&nbsp;valid&nbsp;directory&nbsp;and&nbsp;if&nbsp;so&nbsp;sets&nbsp;this&nbsp;directory&nbsp;as&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a195"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;base&nbsp;directory&nbsp;from&nbsp;which&nbsp;templates&nbsp;are&nbsp;loaded&nbsp;by&nbsp;storing&nbsp;the&nbsp;value&nbsp;in</span></div></li>
<li><div class="src-line"><a name="a196"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;$this-&gt;root.&nbsp;Relative&nbsp;filenames&nbsp;are&nbsp;prepended&nbsp;with&nbsp;the&nbsp;path&nbsp;in&nbsp;$this-&gt;root.</span></div></li>
<li><div class="src-line"><a name="a197"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a198"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns&nbsp;true&nbsp;on&nbsp;success,&nbsp;false&nbsp;on&nbsp;error.</span></div></li>
<li><div class="src-line"><a name="a199"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a200"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;set_root(string&nbsp;$root)</span></div></li>
<li><div class="src-line"><a name="a201"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a202"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string&nbsp;containing&nbsp;new&nbsp;template&nbsp;directory</span></div></li>
<li><div class="src-line"><a name="a203"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;root</span></div></li>
<li><div class="src-line"><a name="a204"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a205"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;boolean</span></div></li>
<li><div class="src-line"><a name="a206"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a207"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodset_root">set_root</a><span class="src-sym">(</span><span class="src-var">$root</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a208"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a209"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;set_root:&lt;/b&gt;&nbsp;root&nbsp;=&nbsp;<span class="src-var">$root</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a210"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a211"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-var">$root</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a212"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodhalt">halt</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">set_root:&nbsp;<span class="src-var">$root</span>&nbsp;is&nbsp;not&nbsp;a&nbsp;directory.</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a213"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a214"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a215"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a216"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$root">root</a>&nbsp;=&nbsp;<span class="src-var">$root</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a217"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a218"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a219"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a220"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a221"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a222"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Sets&nbsp;the&nbsp;policy&nbsp;for&nbsp;dealing&nbsp;with&nbsp;unresolved&nbsp;variable&nbsp;names.</span></div></li>
<li><div class="src-line"><a name="a223"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a224"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;unknowns&nbsp;defines&nbsp;what&nbsp;to&nbsp;do&nbsp;with&nbsp;undefined&nbsp;template&nbsp;variables</span></div></li>
<li><div class="src-line"><a name="a225"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;&quot;remove&quot;&nbsp;&nbsp;&nbsp;=&nbsp;remove&nbsp;undefined&nbsp;variables</span></div></li>
<li><div class="src-line"><a name="a226"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;&quot;comment&quot;&nbsp;&nbsp;=&nbsp;replace&nbsp;undefined&nbsp;variables&nbsp;with&nbsp;comments</span></div></li>
<li><div class="src-line"><a name="a227"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;&quot;keep&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;keep&nbsp;undefined&nbsp;variables</span></div></li>
<li><div class="src-line"><a name="a228"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a229"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Note:&nbsp;&quot;comment&quot;&nbsp;can&nbsp;cause&nbsp;unexpected&nbsp;results&nbsp;when&nbsp;the&nbsp;variable&nbsp;tag&nbsp;is&nbsp;embedded</span></div></li>
<li><div class="src-line"><a name="a230"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;inside&nbsp;an&nbsp;HTML&nbsp;tag,&nbsp;for&nbsp;example&nbsp;a&nbsp;tag&nbsp;which&nbsp;is&nbsp;expected&nbsp;to&nbsp;be&nbsp;replaced&nbsp;with&nbsp;a&nbsp;URL.</span></div></li>
<li><div class="src-line"><a name="a231"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a232"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;set_unknowns(string&nbsp;$unknowns)</span></div></li>
<li><div class="src-line"><a name="a233"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a234"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$unknowns&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;value&nbsp;for&nbsp;unknowns</span></div></li>
<li><div class="src-line"><a name="a235"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unknowns</span></div></li>
<li><div class="src-line"><a name="a236"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a237"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span></div></li>
<li><div class="src-line"><a name="a238"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a239"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodset_unknowns">set_unknowns</a><span class="src-sym">(</span><span class="src-var">$unknowns&nbsp;</span>=&nbsp;<span class="src-str">&quot;remove&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a240"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a241"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;unknowns:&lt;/b&gt;&nbsp;unknowns&nbsp;=&nbsp;<span class="src-var">$unknowns</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a242"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a243"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$unknowns">unknowns</a>&nbsp;=&nbsp;<span class="src-var">$unknowns</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a244"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a245"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a246"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a248"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Defines&nbsp;a&nbsp;filename&nbsp;for&nbsp;the&nbsp;initial&nbsp;value&nbsp;of&nbsp;a&nbsp;variable.</span></div></li>
<li><div class="src-line"><a name="a249"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a250"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;It&nbsp;may&nbsp;be&nbsp;passed&nbsp;either&nbsp;a&nbsp;varname&nbsp;and&nbsp;a&nbsp;file&nbsp;name&nbsp;as&nbsp;two&nbsp;strings&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a251"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;a&nbsp;hash&nbsp;of&nbsp;strings&nbsp;with&nbsp;the&nbsp;key&nbsp;being&nbsp;the&nbsp;varname&nbsp;and&nbsp;the&nbsp;value</span></div></li>
<li><div class="src-line"><a name="a252"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;being&nbsp;the&nbsp;file&nbsp;name.</span></div></li>
<li><div class="src-line"><a name="a253"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a254"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;The&nbsp;new&nbsp;mappings&nbsp;are&nbsp;stored&nbsp;in&nbsp;the&nbsp;array&nbsp;$this-&gt;file.</span></div></li>
<li><div class="src-line"><a name="a255"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;The&nbsp;files&nbsp;are&nbsp;not&nbsp;loaded&nbsp;yet,&nbsp;but&nbsp;only&nbsp;when&nbsp;needed.</span></div></li>
<li><div class="src-line"><a name="a256"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a257"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns&nbsp;true&nbsp;on&nbsp;success,&nbsp;false&nbsp;on&nbsp;error.</span></div></li>
<li><div class="src-line"><a name="a258"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a259"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;set_file(array&nbsp;$filelist&nbsp;=&nbsp;(string&nbsp;$varname&nbsp;=&gt;&nbsp;string&nbsp;$filename))</span></div></li>
<li><div class="src-line"><a name="a260"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a261"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;set_file(string&nbsp;$varname,&nbsp;string&nbsp;$filename)</span></div></li>
<li><div class="src-line"><a name="a262"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a263"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;either&nbsp;a&nbsp;string&nbsp;containing&nbsp;a&nbsp;varname&nbsp;or&nbsp;a&nbsp;hash&nbsp;of&nbsp;varname/file&nbsp;name&nbsp;pairs.</span></div></li>
<li><div class="src-line"><a name="a264"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$filename&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;varname&nbsp;is&nbsp;a&nbsp;string&nbsp;this&nbsp;is&nbsp;the&nbsp;filename&nbsp;otherwise&nbsp;filename&nbsp;is&nbsp;not&nbsp;required</span></div></li>
<li><div class="src-line"><a name="a265"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a266"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;boolean</span></div></li>
<li><div class="src-line"><a name="a267"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a268"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodset_file">set_file</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><span class="src-var">$filename&nbsp;</span>=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a269"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a270"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a271"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;set_file:&lt;/b&gt;&nbsp;(with&nbsp;scalar)&nbsp;varname&nbsp;=&nbsp;<span class="src-var">$varname</span>,&nbsp;filename&nbsp;=&nbsp;<span class="src-var">$filename</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a272"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a273"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$filename&nbsp;</span>==&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a274"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodhalt">halt</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">set_file:&nbsp;For&nbsp;varname&nbsp;<span class="src-var">$varname</span>&nbsp;filename&nbsp;is&nbsp;empty.</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a275"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a276"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a277"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$file">file</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodfilename">filename</a><span class="src-sym">(</span><span class="src-var">$filename</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a278"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a279"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a280"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$v</span><span class="src-sym">,&nbsp;</span><span class="src-var">$f</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a281"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a282"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;set_file:&lt;/b&gt;&nbsp;(with&nbsp;array)&nbsp;varname&nbsp;=&nbsp;<span class="src-var">$v</span>,&nbsp;filename&nbsp;=&nbsp;<span class="src-var">$f</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a283"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a284"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$f&nbsp;</span>==&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a285"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodhalt">halt</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">set_file:&nbsp;For&nbsp;varname&nbsp;<span class="src-var">$v</span>&nbsp;filename&nbsp;is&nbsp;empty.</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a286"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a287"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a288"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$file">file</a><span class="src-sym">[</span><span class="src-var">$v</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodfilename">filename</a><span class="src-sym">(</span><span class="src-var">$f</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a289"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a290"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a291"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a292"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a293"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a294"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a295"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a296"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;A&nbsp;variable&nbsp;$parent&nbsp;may&nbsp;contain&nbsp;a&nbsp;variable&nbsp;block&nbsp;defined&nbsp;by:</span></div></li>
<li><div class="src-line"><a name="a297"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;&amp;lt;!--&nbsp;BEGIN&nbsp;$varname&nbsp;--&amp;gt;&nbsp;content&nbsp;&amp;lt;!--&nbsp;END&nbsp;$varname&nbsp;--&amp;gt;.&nbsp;This&nbsp;function&nbsp;removes</span></div></li>
<li><div class="src-line"><a name="a298"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;that&nbsp;block&nbsp;from&nbsp;$parent&nbsp;and&nbsp;replaces&nbsp;it&nbsp;with&nbsp;a&nbsp;variable&nbsp;reference&nbsp;named&nbsp;$name.</span></div></li>
<li><div class="src-line"><a name="a299"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;The&nbsp;block&nbsp;is&nbsp;inserted&nbsp;into&nbsp;the&nbsp;varkeys&nbsp;and&nbsp;varvals&nbsp;hashes.&nbsp;If&nbsp;$name&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a300"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;omitted,&nbsp;it&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;the&nbsp;same&nbsp;as&nbsp;$varname.</span></div></li>
<li><div class="src-line"><a name="a301"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a302"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Blocks&nbsp;may&nbsp;be&nbsp;nested&nbsp;but&nbsp;care&nbsp;must&nbsp;be&nbsp;taken&nbsp;to&nbsp;extract&nbsp;the&nbsp;blocks&nbsp;in&nbsp;order</span></div></li>
<li><div class="src-line"><a name="a303"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;from&nbsp;the&nbsp;innermost&nbsp;block&nbsp;to&nbsp;the&nbsp;outermost&nbsp;block.</span></div></li>
<li><div class="src-line"><a name="a304"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a305"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns&nbsp;true&nbsp;on&nbsp;success,&nbsp;false&nbsp;on&nbsp;error.</span></div></li>
<li><div class="src-line"><a name="a306"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a307"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;set_block(string&nbsp;$parent,&nbsp;string&nbsp;$varname,&nbsp;[string&nbsp;$name&nbsp;=&nbsp;&quot;&quot;])</span></div></li>
<li><div class="src-line"><a name="a308"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a309"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$parent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;parent&nbsp;variable</span></div></li>
<li><div class="src-line"><a name="a310"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;block&nbsp;to&nbsp;be&nbsp;extracted</span></div></li>
<li><div class="src-line"><a name="a311"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;in&nbsp;which&nbsp;to&nbsp;store&nbsp;the&nbsp;block</span></div></li>
<li><div class="src-line"><a name="a312"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a313"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;boolean</span></div></li>
<li><div class="src-line"><a name="a314"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a315"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodset_block">set_block</a><span class="src-sym">(</span><span class="src-var">$parent</span><span class="src-sym">,&nbsp;</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a316"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a317"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;set_block:&lt;/b&gt;&nbsp;parent&nbsp;=&nbsp;<span class="src-var">$parent</span>,&nbsp;varname&nbsp;=&nbsp;<span class="src-var">$varname</span>,&nbsp;name&nbsp;=&nbsp;<span class="src-var">$name</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a318"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a319"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodloadfile">loadfile</a><span class="src-sym">(</span><span class="src-var">$parent</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a320"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodhalt">halt</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">set_block:&nbsp;unable&nbsp;to&nbsp;load&nbsp;<span class="src-var">$parent</span>.</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a321"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a322"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a323"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$name&nbsp;</span>==&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a324"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-var">$varname</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a325"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a326"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a327"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodget_var">get_var</a><span class="src-sym">(</span><span class="src-var">$parent</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a328"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$reg&nbsp;</span>=&nbsp;<span class="src-str">&quot;</span><span class="src-str">/[&nbsp;\t]*&lt;!--\s+BEGIN&nbsp;<span class="src-var">$varname</span>\s+--&gt;\s*?\n?(\s*.*?\n?)\s*&lt;!--\s+END&nbsp;<span class="src-var">$varname</span>\s+--&gt;\s*?\n?/sm</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a329"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/preg_match_all">preg_match_all</a><span class="src-sym">(</span><span class="src-var">$reg</span><span class="src-sym">,&nbsp;</span><span class="src-var">$str</span><span class="src-sym">,&nbsp;</span><span class="src-var">$m</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a330"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-var">$reg</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;{&quot;&nbsp;</span>.&nbsp;<span class="src-str">&quot;</span><span class="src-str"><span class="src-var">$name</span>}</span><span class="src-str">&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a331"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><span class="src-var">$m</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a332"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$parent</span><span class="src-sym">,&nbsp;</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a333"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a334"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a335"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a336"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a337"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a338"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;functions&nbsp;sets&nbsp;the&nbsp;value&nbsp;of&nbsp;a&nbsp;variable.</span></div></li>
<li><div class="src-line"><a name="a339"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a340"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;It&nbsp;may&nbsp;be&nbsp;called&nbsp;with&nbsp;either&nbsp;a&nbsp;varname&nbsp;and&nbsp;a&nbsp;value&nbsp;as&nbsp;two&nbsp;strings&nbsp;or&nbsp;an</span></div></li>
<li><div class="src-line"><a name="a341"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;an&nbsp;associative&nbsp;array&nbsp;with&nbsp;the&nbsp;key&nbsp;being&nbsp;the&nbsp;varname&nbsp;and&nbsp;the&nbsp;value&nbsp;being</span></div></li>
<li><div class="src-line"><a name="a342"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;the&nbsp;new&nbsp;variable&nbsp;value.</span></div></li>
<li><div class="src-line"><a name="a343"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a344"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;The&nbsp;function&nbsp;inserts&nbsp;the&nbsp;new&nbsp;value&nbsp;of&nbsp;the&nbsp;variable&nbsp;into&nbsp;the&nbsp;$varkeys&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a345"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;$varvals&nbsp;hashes.&nbsp;It&nbsp;is&nbsp;not&nbsp;necessary&nbsp;for&nbsp;a&nbsp;variable&nbsp;to&nbsp;exist&nbsp;in&nbsp;these&nbsp;hashes</span></div></li>
<li><div class="src-line"><a name="a346"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;before&nbsp;calling&nbsp;this&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a347"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a348"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;An&nbsp;optional&nbsp;third&nbsp;parameter&nbsp;allows&nbsp;the&nbsp;value&nbsp;for&nbsp;each&nbsp;varname&nbsp;to&nbsp;be&nbsp;appended</span></div></li>
<li><div class="src-line"><a name="a349"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;to&nbsp;the&nbsp;existing&nbsp;variable&nbsp;instead&nbsp;of&nbsp;replacing&nbsp;it.&nbsp;The&nbsp;default&nbsp;is&nbsp;to&nbsp;replace.</span></div></li>
<li><div class="src-line"><a name="a350"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;feature&nbsp;was&nbsp;introduced&nbsp;after&nbsp;the&nbsp;7.2d&nbsp;release.</span></div></li>
<li><div class="src-line"><a name="a351"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a352"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a353"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;set_var(string&nbsp;$varname,&nbsp;[string&nbsp;$value&nbsp;=&nbsp;&quot;&quot;],&nbsp;[boolean&nbsp;$append&nbsp;=&nbsp;false])</span></div></li>
<li><div class="src-line"><a name="a354"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a355"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;set_var(array&nbsp;$varname&nbsp;=&nbsp;(string&nbsp;$varname&nbsp;=&gt;&nbsp;string&nbsp;$value),&nbsp;[mixed&nbsp;$dummy_var],&nbsp;[boolean&nbsp;$append&nbsp;=&nbsp;false])</span></div></li>
<li><div class="src-line"><a name="a356"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a357"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;either&nbsp;a&nbsp;string&nbsp;containing&nbsp;a&nbsp;varname&nbsp;or&nbsp;a&nbsp;hash&nbsp;of&nbsp;varname/value&nbsp;pairs.</span></div></li>
<li><div class="src-line"><a name="a358"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;$varname&nbsp;is&nbsp;a&nbsp;string&nbsp;this&nbsp;contains&nbsp;the&nbsp;new&nbsp;value&nbsp;for&nbsp;the&nbsp;variable&nbsp;otherwise&nbsp;this&nbsp;parameter&nbsp;is&nbsp;ignored</span></div></li>
<li><div class="src-line"><a name="a359"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$append&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;true,&nbsp;the&nbsp;value&nbsp;is&nbsp;appended&nbsp;to&nbsp;the&nbsp;variable's&nbsp;existing&nbsp;value</span></div></li>
<li><div class="src-line"><a name="a360"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a361"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span></div></li>
<li><div class="src-line"><a name="a362"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a363"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$append&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a364"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a365"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a366"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a367"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;set_var:&lt;/b&gt;&nbsp;(with&nbsp;scalar)&nbsp;&lt;b&gt;%s&lt;/b&gt;&nbsp;=&nbsp;'%s'&lt;br&gt;\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/htmlentities">htmlentities</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a368"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a369"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varkeys">varkeys</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-str">&quot;/&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodvarname">varname</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span>.<span class="src-str">&quot;/&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a370"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$append&nbsp;</span>&amp;&amp;&nbsp;isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a371"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]&nbsp;</span>.=&nbsp;<span class="src-var">$value</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a372"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a373"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$value</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a374"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a375"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a376"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a377"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a378"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a379"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a380"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a381"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;set_var:&lt;/b&gt;&nbsp;(with&nbsp;array)&nbsp;&lt;b&gt;%s&lt;/b&gt;&nbsp;=&nbsp;'%s'&lt;br&gt;\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$k</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/htmlentities">htmlentities</a><span class="src-sym">(</span><span class="src-var">$v</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a382"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a383"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varkeys">varkeys</a><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-str">&quot;/&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodvarname">varname</a><span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">)</span>.<span class="src-str">&quot;/&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a384"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$append&nbsp;</span>&amp;&amp;&nbsp;isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a385"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]&nbsp;</span>.=&nbsp;<span class="src-var">$v</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a386"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a387"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$v</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a388"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a389"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a390"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a391"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a392"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a393"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a394"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a395"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a396"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;functions&nbsp;clears&nbsp;the&nbsp;value&nbsp;of&nbsp;a&nbsp;variable.</span></div></li>
<li><div class="src-line"><a name="a397"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a398"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;It&nbsp;may&nbsp;be&nbsp;called&nbsp;with&nbsp;either&nbsp;a&nbsp;varname&nbsp;as&nbsp;a&nbsp;string&nbsp;or&nbsp;an&nbsp;array&nbsp;with&nbsp;the&nbsp;</span></div></li>
<li><div class="src-line"><a name="a399"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;values&nbsp;being&nbsp;the&nbsp;varnames&nbsp;to&nbsp;be&nbsp;cleared.</span></div></li>
<li><div class="src-line"><a name="a400"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a401"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;The&nbsp;function&nbsp;sets&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;variable&nbsp;in&nbsp;the&nbsp;$varkeys&nbsp;and&nbsp;$varvals&nbsp;</span></div></li>
<li><div class="src-line"><a name="a402"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;hashes&nbsp;to&nbsp;&quot;&quot;.&nbsp;It&nbsp;is&nbsp;not&nbsp;necessary&nbsp;for&nbsp;a&nbsp;variable&nbsp;to&nbsp;exist&nbsp;in&nbsp;these&nbsp;hashes</span></div></li>
<li><div class="src-line"><a name="a403"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;before&nbsp;calling&nbsp;this&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a404"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a405"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a406"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;clear_var(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a407"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a408"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;clear_var(array&nbsp;$varname&nbsp;=&nbsp;(string&nbsp;$varname))</span></div></li>
<li><div class="src-line"><a name="a409"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a410"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;either&nbsp;a&nbsp;string&nbsp;containing&nbsp;a&nbsp;varname&nbsp;or&nbsp;an&nbsp;array&nbsp;of&nbsp;varnames.</span></div></li>
<li><div class="src-line"><a name="a411"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a412"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span></div></li>
<li><div class="src-line"><a name="a413"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a414"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodclear_var">clear_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a415"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a416"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a417"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a418"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;clear_var:&lt;/b&gt;&nbsp;(with&nbsp;scalar)&nbsp;&lt;b&gt;%s&lt;/b&gt;&lt;br&gt;\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a419"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a420"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a421"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a422"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a423"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a424"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a425"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$v</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a426"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a427"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;clear_var:&lt;/b&gt;&nbsp;(with&nbsp;array)&nbsp;&lt;b&gt;%s&lt;/b&gt;&lt;br&gt;\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a428"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a429"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$v</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a430"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a431"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a432"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a433"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a434"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a435"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a436"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a437"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;functions&nbsp;unsets&nbsp;a&nbsp;variable&nbsp;completely.</span></div></li>
<li><div class="src-line"><a name="a438"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a439"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;It&nbsp;may&nbsp;be&nbsp;called&nbsp;with&nbsp;either&nbsp;a&nbsp;varname&nbsp;as&nbsp;a&nbsp;string&nbsp;or&nbsp;an&nbsp;array&nbsp;with&nbsp;the&nbsp;</span></div></li>
<li><div class="src-line"><a name="a440"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;values&nbsp;being&nbsp;the&nbsp;varnames&nbsp;to&nbsp;be&nbsp;cleared.</span></div></li>
<li><div class="src-line"><a name="a441"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a442"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;The&nbsp;function&nbsp;removes&nbsp;the&nbsp;variable&nbsp;from&nbsp;the&nbsp;$varkeys&nbsp;and&nbsp;$varvals&nbsp;hashes.</span></div></li>
<li><div class="src-line"><a name="a443"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;It&nbsp;is&nbsp;not&nbsp;necessary&nbsp;for&nbsp;a&nbsp;variable&nbsp;to&nbsp;exist&nbsp;in&nbsp;these&nbsp;hashes&nbsp;before&nbsp;calling</span></div></li>
<li><div class="src-line"><a name="a444"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;this&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a445"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a446"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a447"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;unset_var(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a448"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a449"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;unset_var(array&nbsp;$varname&nbsp;=&nbsp;(string&nbsp;$varname))</span></div></li>
<li><div class="src-line"><a name="a450"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a451"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;either&nbsp;a&nbsp;string&nbsp;containing&nbsp;a&nbsp;varname&nbsp;or&nbsp;an&nbsp;array&nbsp;of&nbsp;varnames.</span></div></li>
<li><div class="src-line"><a name="a452"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a453"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span></div></li>
<li><div class="src-line"><a name="a454"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a455"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodunset_var">unset_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a456"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a457"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a458"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a459"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;unset_var:&lt;/b&gt;&nbsp;(with&nbsp;scalar)&nbsp;&lt;b&gt;%s&lt;/b&gt;&lt;br&gt;\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a460"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a461"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varkeys">varkeys</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a462"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a463"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a464"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a465"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a466"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a467"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$v</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a468"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a469"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;unset_var:&lt;/b&gt;&nbsp;(with&nbsp;array)&nbsp;&lt;b&gt;%s&lt;/b&gt;&lt;br&gt;\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a470"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a471"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varkeys">varkeys</a><span class="src-sym">[</span><span class="src-var">$v</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a472"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$v</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a473"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a474"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a475"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a476"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a477"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a478"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a479"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a480"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;fills&nbsp;in&nbsp;all&nbsp;the&nbsp;variables&nbsp;contained&nbsp;within&nbsp;the&nbsp;variable&nbsp;named</span></div></li>
<li><div class="src-line"><a name="a481"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;$varname.&nbsp;The&nbsp;resulting&nbsp;value&nbsp;is&nbsp;returned&nbsp;as&nbsp;the&nbsp;function&nbsp;result&nbsp;and&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a482"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;original&nbsp;value&nbsp;of&nbsp;the&nbsp;variable&nbsp;varname&nbsp;is&nbsp;not&nbsp;changed.&nbsp;The&nbsp;resulting&nbsp;string</span></div></li>
<li><div class="src-line"><a name="a483"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;is&nbsp;not&nbsp;&quot;finished&quot;,&nbsp;that&nbsp;is,&nbsp;the&nbsp;unresolved&nbsp;variable&nbsp;name&nbsp;policy&nbsp;has&nbsp;not&nbsp;been</span></div></li>
<li><div class="src-line"><a name="a484"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;applied&nbsp;yet.</span></div></li>
<li><div class="src-line"><a name="a485"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a486"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;variable&nbsp;$varname&nbsp;with&nbsp;all&nbsp;variables&nbsp;substituted.</span></div></li>
<li><div class="src-line"><a name="a487"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a488"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;subst(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a489"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a490"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;within&nbsp;which&nbsp;variables&nbsp;are&nbsp;to&nbsp;be&nbsp;substituted</span></div></li>
<li><div class="src-line"><a name="a491"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a492"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;string</span></div></li>
<li><div class="src-line"><a name="a493"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a494"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodsubst">subst</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a495"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$varvals_quoted&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a496"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a497"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;subst:&lt;/b&gt;&nbsp;varname&nbsp;=&nbsp;<span class="src-var">$varname</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a498"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a499"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodloadfile">loadfile</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a500"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodhalt">halt</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">subst:&nbsp;unable&nbsp;to&nbsp;load&nbsp;<span class="src-var">$varname</span>.</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a501"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a502"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a503"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a504"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;quote&nbsp;the&nbsp;replacement&nbsp;strings&nbsp;to&nbsp;prevent&nbsp;bogus&nbsp;stripping&nbsp;of&nbsp;special&nbsp;chars</span></div></li>
<li><div class="src-line"><a name="a505"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a506"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a507"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$varvals_quoted</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]&nbsp;</span>=&nbsp;<a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'/\\\\/'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'/\$/'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'\\\\\\\\'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'\\\\$'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a508"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a509"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a510"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodget_var">get_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a511"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varkeys">varkeys</a><span class="src-sym">,&nbsp;</span><span class="src-var">$varvals_quoted</span><span class="src-sym">,&nbsp;</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a512"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$str</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a513"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a514"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a515"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a516"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a517"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;shorthand&nbsp;for&nbsp;print&nbsp;$this-&gt;subst($varname).&nbsp;See&nbsp;subst&nbsp;for&nbsp;further</span></div></li>
<li><div class="src-line"><a name="a518"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;details.</span></div></li>
<li><div class="src-line"><a name="a519"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a520"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;always&nbsp;returns&nbsp;false.</span></div></li>
<li><div class="src-line"><a name="a521"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a522"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;psubst(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a523"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a524"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;within&nbsp;which&nbsp;variables&nbsp;are&nbsp;to&nbsp;be&nbsp;substituted</span></div></li>
<li><div class="src-line"><a name="a525"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a526"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;false</span></div></li>
<li><div class="src-line"><a name="a527"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subst</span></div></li>
<li><div class="src-line"><a name="a528"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a529"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodpsubst">psubst</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a530"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a531"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;psubst:&lt;/b&gt;&nbsp;varname&nbsp;=&nbsp;<span class="src-var">$varname</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a532"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a533"></a>&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodsubst">subst</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a534"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a535"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a536"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a537"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a538"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a539"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a540"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;The&nbsp;function&nbsp;substitutes&nbsp;the&nbsp;values&nbsp;of&nbsp;all&nbsp;defined&nbsp;variables&nbsp;in&nbsp;the&nbsp;variable</span></div></li>
<li><div class="src-line"><a name="a541"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;named&nbsp;$varname&nbsp;and&nbsp;stores&nbsp;or&nbsp;appends&nbsp;the&nbsp;result&nbsp;in&nbsp;the&nbsp;variable&nbsp;named&nbsp;$target.</span></div></li>
<li><div class="src-line"><a name="a542"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a543"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;It&nbsp;may&nbsp;be&nbsp;called&nbsp;with&nbsp;either&nbsp;a&nbsp;target&nbsp;and&nbsp;a&nbsp;varname&nbsp;as&nbsp;two&nbsp;strings&nbsp;or&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a544"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;target&nbsp;as&nbsp;a&nbsp;string&nbsp;and&nbsp;an&nbsp;array&nbsp;of&nbsp;variable&nbsp;names&nbsp;in&nbsp;varname.</span></div></li>
<li><div class="src-line"><a name="a545"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a546"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;The&nbsp;function&nbsp;inserts&nbsp;the&nbsp;new&nbsp;value&nbsp;of&nbsp;the&nbsp;variable&nbsp;into&nbsp;the&nbsp;$varkeys&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a547"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;$varvals&nbsp;hashes.&nbsp;It&nbsp;is&nbsp;not&nbsp;necessary&nbsp;for&nbsp;a&nbsp;variable&nbsp;to&nbsp;exist&nbsp;in&nbsp;these&nbsp;hashes</span></div></li>
<li><div class="src-line"><a name="a548"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;before&nbsp;calling&nbsp;this&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a549"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a550"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;An&nbsp;optional&nbsp;third&nbsp;parameter&nbsp;allows&nbsp;the&nbsp;value&nbsp;for&nbsp;each&nbsp;varname&nbsp;to&nbsp;be&nbsp;appended</span></div></li>
<li><div class="src-line"><a name="a551"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;to&nbsp;the&nbsp;existing&nbsp;target&nbsp;variable&nbsp;instead&nbsp;of&nbsp;replacing&nbsp;it.&nbsp;The&nbsp;default&nbsp;is&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a552"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;replace.</span></div></li>
<li><div class="src-line"><a name="a553"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a554"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;If&nbsp;$target&nbsp;and&nbsp;$varname&nbsp;are&nbsp;both&nbsp;strings,&nbsp;the&nbsp;substituted&nbsp;value&nbsp;of&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a555"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;variable&nbsp;$varname&nbsp;is&nbsp;inserted&nbsp;into&nbsp;or&nbsp;appended&nbsp;to&nbsp;$target.</span></div></li>
<li><div class="src-line"><a name="a556"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a557"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;If&nbsp;$handle&nbsp;is&nbsp;an&nbsp;array&nbsp;of&nbsp;variable&nbsp;names&nbsp;the&nbsp;variables&nbsp;named&nbsp;by&nbsp;$handle&nbsp;are</span></div></li>
<li><div class="src-line"><a name="a558"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;sequentially&nbsp;substituted&nbsp;and&nbsp;the&nbsp;result&nbsp;of&nbsp;each&nbsp;substitution&nbsp;step&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a559"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;inserted&nbsp;into&nbsp;or&nbsp;appended&nbsp;to&nbsp;in&nbsp;$target.&nbsp;The&nbsp;resulting&nbsp;substitution&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a560"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;available&nbsp;in&nbsp;the&nbsp;variable&nbsp;named&nbsp;by&nbsp;$target,&nbsp;as&nbsp;is&nbsp;each&nbsp;intermediate&nbsp;step</span></div></li>
<li><div class="src-line"><a name="a561"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;for&nbsp;the&nbsp;next&nbsp;$varname&nbsp;in&nbsp;sequence.&nbsp;Note&nbsp;that&nbsp;while&nbsp;it&nbsp;is&nbsp;possible,&nbsp;it</span></div></li>
<li><div class="src-line"><a name="a562"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;is&nbsp;only&nbsp;rarely&nbsp;desirable&nbsp;to&nbsp;call&nbsp;this&nbsp;function&nbsp;with&nbsp;an&nbsp;array&nbsp;of&nbsp;varnames</span></div></li>
<li><div class="src-line"><a name="a563"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;and&nbsp;with&nbsp;$append&nbsp;=&nbsp;true.&nbsp;This&nbsp;append&nbsp;feature&nbsp;was&nbsp;introduced&nbsp;after&nbsp;the&nbsp;7.2d</span></div></li>
<li><div class="src-line"><a name="a564"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;release.</span></div></li>
<li><div class="src-line"><a name="a565"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a566"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;the&nbsp;last&nbsp;value&nbsp;assigned&nbsp;to&nbsp;$target.</span></div></li>
<li><div class="src-line"><a name="a567"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a568"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;parse(string&nbsp;$target,&nbsp;string&nbsp;$varname,&nbsp;[boolean&nbsp;$append])</span></div></li>
<li><div class="src-line"><a name="a569"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a570"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;parse(string&nbsp;$target,&nbsp;array&nbsp;$varname&nbsp;=&nbsp;(string&nbsp;$varname),&nbsp;[boolean&nbsp;$append])</span></div></li>
<li><div class="src-line"><a name="a571"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a572"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$target&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;into&nbsp;which&nbsp;substituted&nbsp;$varnames&nbsp;are&nbsp;to&nbsp;be&nbsp;stored</span></div></li>
<li><div class="src-line"><a name="a573"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;a&nbsp;string,&nbsp;the&nbsp;name&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;to&nbsp;substitute&nbsp;or&nbsp;if&nbsp;an&nbsp;array&nbsp;a&nbsp;list&nbsp;of&nbsp;variables&nbsp;to&nbsp;be&nbsp;substituted</span></div></li>
<li><div class="src-line"><a name="a574"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$append&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;true,&nbsp;the&nbsp;substituted&nbsp;variables&nbsp;are&nbsp;appended&nbsp;to&nbsp;$target&nbsp;otherwise&nbsp;the&nbsp;existing&nbsp;value&nbsp;of&nbsp;$target&nbsp;is&nbsp;replaced</span></div></li>
<li><div class="src-line"><a name="a575"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a576"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;string</span></div></li>
<li><div class="src-line"><a name="a577"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subst</span></div></li>
<li><div class="src-line"><a name="a578"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a579"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodparse">parse</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">,&nbsp;</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><span class="src-var">$append&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a580"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a581"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a582"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;parse:&lt;/b&gt;&nbsp;(with&nbsp;scalar)&nbsp;target&nbsp;=&nbsp;<span class="src-var">$target</span>,&nbsp;varname&nbsp;=&nbsp;<span class="src-var">$varname</span>,&nbsp;append&nbsp;=&nbsp;<span class="src-var">$append</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a583"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a584"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodsubst">subst</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a585"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$append</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a586"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodget_var">get_var</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a587"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a588"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">,&nbsp;</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a589"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a590"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a591"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a592"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a593"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a594"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;parse:&lt;/b&gt;&nbsp;(with&nbsp;array)&nbsp;target&nbsp;=&nbsp;<span class="src-var">$target</span>,&nbsp;i&nbsp;=&nbsp;<span class="src-var">$i</span>,&nbsp;varname&nbsp;=&nbsp;<span class="src-var">$v</span>,&nbsp;append&nbsp;=&nbsp;<span class="src-var">$append</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a595"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a596"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodsubst">subst</a><span class="src-sym">(</span><span class="src-var">$v</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a597"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$append</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a598"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodget_var">get_var</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a599"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a600"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">,&nbsp;</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a601"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a602"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a603"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a604"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a605"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a606"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;&lt;p&gt;&lt;b&gt;parse:&lt;/b&gt;&nbsp;completed&lt;/p&gt;\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a607"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a608"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$str</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a609"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a610"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a611"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a612"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a613"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;shorthand&nbsp;for&nbsp;print&nbsp;$this-&gt;parse(...)&nbsp;and&nbsp;is&nbsp;functionally&nbsp;identical.</span></div></li>
<li><div class="src-line"><a name="a614"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;See&nbsp;parse&nbsp;for&nbsp;further&nbsp;details.</span></div></li>
<li><div class="src-line"><a name="a615"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a616"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;always&nbsp;returns&nbsp;false.</span></div></li>
<li><div class="src-line"><a name="a617"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a618"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;pparse(string&nbsp;$target,&nbsp;string&nbsp;$varname,&nbsp;[boolean&nbsp;$append])</span></div></li>
<li><div class="src-line"><a name="a619"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a620"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;pparse(string&nbsp;$target,&nbsp;array&nbsp;$varname&nbsp;=&nbsp;(string&nbsp;$varname),&nbsp;[boolean&nbsp;$append])</span></div></li>
<li><div class="src-line"><a name="a621"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a622"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$target&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;into&nbsp;which&nbsp;substituted&nbsp;$varnames&nbsp;are&nbsp;to&nbsp;be&nbsp;stored</span></div></li>
<li><div class="src-line"><a name="a623"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;a&nbsp;string,&nbsp;the&nbsp;name&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;to&nbsp;substitute&nbsp;or&nbsp;if&nbsp;an&nbsp;array&nbsp;a&nbsp;list&nbsp;of&nbsp;variables&nbsp;to&nbsp;be&nbsp;substituted</span></div></li>
<li><div class="src-line"><a name="a624"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$append&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;true,&nbsp;the&nbsp;substituted&nbsp;variables&nbsp;are&nbsp;appended&nbsp;to&nbsp;$target&nbsp;otherwise&nbsp;the&nbsp;existing&nbsp;value&nbsp;of&nbsp;$target&nbsp;is&nbsp;replaced</span></div></li>
<li><div class="src-line"><a name="a625"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a626"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;false</span></div></li>
<li><div class="src-line"><a name="a627"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parse</span></div></li>
<li><div class="src-line"><a name="a628"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a629"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodpparse">pparse</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">,&nbsp;</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><span class="src-var">$append&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a630"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a631"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;&lt;p&gt;&lt;b&gt;pparse:&lt;/b&gt;&nbsp;passing&nbsp;parameters&nbsp;to&nbsp;parse...&lt;/p&gt;\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a632"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a633"></a>&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodfinish">finish</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodparse">parse</a><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">,&nbsp;</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><span class="src-var">$append</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a634"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a635"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a636"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a637"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a638"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a639"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;an&nbsp;associative&nbsp;array&nbsp;of&nbsp;all&nbsp;defined&nbsp;variables&nbsp;with&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a640"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;name&nbsp;as&nbsp;the&nbsp;key&nbsp;and&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;variable&nbsp;as&nbsp;the&nbsp;value.</span></div></li>
<li><div class="src-line"><a name="a641"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a642"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;mostly&nbsp;useful&nbsp;for&nbsp;debugging.&nbsp;Also&nbsp;note&nbsp;that&nbsp;$this-&gt;debug&nbsp;can&nbsp;be&nbsp;used</span></div></li>
<li><div class="src-line"><a name="a643"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;to&nbsp;echo&nbsp;all&nbsp;variable&nbsp;assignments&nbsp;as&nbsp;they&nbsp;occur&nbsp;and&nbsp;to&nbsp;trace&nbsp;execution.</span></div></li>
<li><div class="src-line"><a name="a644"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a645"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;a&nbsp;hash&nbsp;of&nbsp;all&nbsp;defined&nbsp;variable&nbsp;values&nbsp;keyed&nbsp;by&nbsp;their&nbsp;names.</span></div></li>
<li><div class="src-line"><a name="a646"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a647"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;get_vars()</span></div></li>
<li><div class="src-line"><a name="a648"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a649"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a650"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;array</span></div></li>
<li><div class="src-line"><a name="a651"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$debug</span></div></li>
<li><div class="src-line"><a name="a652"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a653"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodget_vars">get_vars</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a654"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a655"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;&lt;p&gt;&lt;b&gt;get_vars:&lt;/b&gt;&nbsp;constructing&nbsp;array&nbsp;of&nbsp;vars...&lt;/p&gt;\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a656"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a657"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varkeys">varkeys</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a658"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varkeys">varkeys</a><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a659"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$result</span><span class="src-sym">[</span><span class="src-var">$k</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodget_var">get_var</a><span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a660"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a661"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$result</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a662"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a663"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a664"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a665"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a666"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;variable&nbsp;named&nbsp;by&nbsp;$varname.</span></div></li>
<li><div class="src-line"><a name="a667"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;If&nbsp;$varname&nbsp;references&nbsp;a&nbsp;file&nbsp;and&nbsp;that&nbsp;file&nbsp;has&nbsp;not&nbsp;been&nbsp;loaded&nbsp;yet,&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a668"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;variable&nbsp;will&nbsp;be&nbsp;reported&nbsp;as&nbsp;empty.</span></div></li>
<li><div class="src-line"><a name="a669"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a670"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;When&nbsp;called&nbsp;with&nbsp;an&nbsp;array&nbsp;of&nbsp;variable&nbsp;names&nbsp;this&nbsp;function&nbsp;will&nbsp;return&nbsp;a&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a671"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;hash&nbsp;of&nbsp;variable&nbsp;values&nbsp;keyed&nbsp;by&nbsp;their&nbsp;names.</span></div></li>
<li><div class="src-line"><a name="a672"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a673"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;a&nbsp;string&nbsp;or&nbsp;an&nbsp;array&nbsp;containing&nbsp;the&nbsp;value&nbsp;of&nbsp;$varname.</span></div></li>
<li><div class="src-line"><a name="a674"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a675"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;get_var(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a676"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a677"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;get_var(array&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a678"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a679"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;a&nbsp;string,&nbsp;the&nbsp;name&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;to&nbsp;get&nbsp;the&nbsp;value&nbsp;of,&nbsp;or&nbsp;if&nbsp;an&nbsp;array&nbsp;a&nbsp;list&nbsp;of&nbsp;variables&nbsp;to&nbsp;return&nbsp;the&nbsp;value&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a680"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a681"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;string&nbsp;or&nbsp;array</span></div></li>
<li><div class="src-line"><a name="a682"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a683"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodget_var">get_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a684"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a685"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a686"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a687"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a688"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a689"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a690"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">2</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a691"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a>&nbsp;<span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;get_var&lt;/b&gt;&nbsp;(with&nbsp;scalar)&nbsp;&lt;b&gt;%s&lt;/b&gt;&nbsp;=&nbsp;'%s'&lt;br&gt;\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/htmlentities">htmlentities</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a692"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a693"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$str</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a694"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a695"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a696"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a697"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$v</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a698"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$v</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a699"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a700"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a701"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a702"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">2</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a703"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a>&nbsp;<span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;get_var:&lt;/b&gt;&nbsp;(with&nbsp;array)&nbsp;&lt;b&gt;%s&lt;/b&gt;&nbsp;=&nbsp;'%s'&lt;br&gt;\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/htmlentities">htmlentities</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a704"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a705"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$result</span><span class="src-sym">[</span><span class="src-var">$v</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$str</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a706"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a707"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$result</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a708"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a709"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a710"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a711"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a712"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a713"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;a&nbsp;hash&nbsp;of&nbsp;unresolved&nbsp;variable&nbsp;names&nbsp;in&nbsp;$varname,&nbsp;keyed</span></div></li>
<li><div class="src-line"><a name="a714"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;by&nbsp;their&nbsp;names&nbsp;(that&nbsp;is,&nbsp;the&nbsp;hash&nbsp;has&nbsp;the&nbsp;form&nbsp;$a[$name]&nbsp;=&nbsp;$name).</span></div></li>
<li><div class="src-line"><a name="a715"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a716"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;a&nbsp;hash&nbsp;of&nbsp;varname/varname&nbsp;pairs&nbsp;or&nbsp;false&nbsp;on&nbsp;error.</span></div></li>
<li><div class="src-line"><a name="a717"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a718"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;get_undefined(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a719"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a720"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;the&nbsp;name&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;to&nbsp;scan&nbsp;for&nbsp;unresolved&nbsp;variables</span></div></li>
<li><div class="src-line"><a name="a721"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a722"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;array</span></div></li>
<li><div class="src-line"><a name="a723"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a724"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodget_undefined">get_undefined</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a725"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a726"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;get_undefined:&lt;/b&gt;&nbsp;varname&nbsp;=&nbsp;<span class="src-var">$varname</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a727"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a728"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodloadfile">loadfile</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a729"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodhalt">halt</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">get_undefined:&nbsp;unable&nbsp;to&nbsp;load&nbsp;<span class="src-var">$varname</span>.</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a730"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a731"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a732"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a733"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/preg_match_all">preg_match_all</a><span class="src-sym">(</span><span class="src-str">&quot;/{([^&nbsp;\t\r\n}]+)}/&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodget_var">get_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$m</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a734"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$m&nbsp;</span>=&nbsp;<span class="src-var">$m</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a735"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$m</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a736"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a737"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a738"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a739"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$m</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a740"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$k</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$m</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a741"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varkeys">varkeys</a><span class="src-sym">[</span><span class="src-var">$v</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a742"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a743"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;get_undefined:&lt;/b&gt;&nbsp;undefined:&nbsp;<span class="src-var">$v</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a744"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a745"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$result</span><span class="src-sym">[</span><span class="src-var">$v</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$v</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a746"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a747"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a748"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a749"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$result</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a750"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$result</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a751"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a752"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a753"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a754"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a755"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a756"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a757"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a758"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;the&nbsp;finished&nbsp;version&nbsp;of&nbsp;$str.&nbsp;That&nbsp;is,&nbsp;the&nbsp;policy</span></div></li>
<li><div class="src-line"><a name="a759"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;regarding&nbsp;unresolved&nbsp;variable&nbsp;names&nbsp;will&nbsp;be&nbsp;applied&nbsp;to&nbsp;$str.</span></div></li>
<li><div class="src-line"><a name="a760"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a761"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;a&nbsp;finished&nbsp;string&nbsp;derived&nbsp;from&nbsp;$str&nbsp;and&nbsp;$this-&gt;unknowns.</span></div></li>
<li><div class="src-line"><a name="a762"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a763"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;finish(string&nbsp;$str)</span></div></li>
<li><div class="src-line"><a name="a764"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a765"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$str&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;to&nbsp;which&nbsp;to&nbsp;apply&nbsp;the&nbsp;unresolved&nbsp;variable&nbsp;policy</span></div></li>
<li><div class="src-line"><a name="a766"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a767"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;string</span></div></li>
<li><div class="src-line"><a name="a768"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_unknowns</span></div></li>
<li><div class="src-line"><a name="a769"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a770"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodfinish">finish</a><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a771"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">switch&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$unknowns">unknowns</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a772"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">&quot;keep&quot;</span>:</div></li>
<li><div class="src-line"><a name="a773"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a774"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a775"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">&quot;remove&quot;</span>:</div></li>
<li><div class="src-line"><a name="a776"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/{[^&nbsp;\t\r\n}]+}/'</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a777"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a778"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a779"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">&quot;comment&quot;</span>:</div></li>
<li><div class="src-line"><a name="a780"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/{([^&nbsp;\t\r\n}]+)}/'</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;&lt;!--&nbsp;Template&nbsp;variable&nbsp;\\1&nbsp;undefined&nbsp;--&gt;&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a781"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a782"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a783"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a784"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$str</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a785"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a786"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a787"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a788"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a789"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;prints&nbsp;the&nbsp;finished&nbsp;version&nbsp;of&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;variable&nbsp;named</span></div></li>
<li><div class="src-line"><a name="a790"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;by&nbsp;$varname.&nbsp;That&nbsp;is,&nbsp;the&nbsp;policy&nbsp;regarding&nbsp;unresolved&nbsp;variable&nbsp;names&nbsp;will&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a791"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;applied&nbsp;to&nbsp;the&nbsp;variable&nbsp;$varname&nbsp;then&nbsp;it&nbsp;will&nbsp;be&nbsp;printed.</span></div></li>
<li><div class="src-line"><a name="a792"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a793"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;p(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a794"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a795"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;to&nbsp;finish&nbsp;and&nbsp;print</span></div></li>
<li><div class="src-line"><a name="a796"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a797"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span></div></li>
<li><div class="src-line"><a name="a798"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_unknowns</span></div></li>
<li><div class="src-line"><a name="a799"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;finish</span></div></li>
<li><div class="src-line"><a name="a800"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a801"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodp">p</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a802"></a>&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodfinish">finish</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodget_var">get_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a803"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a804"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a805"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a806"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a807"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;the&nbsp;finished&nbsp;version&nbsp;of&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;variable&nbsp;named</span></div></li>
<li><div class="src-line"><a name="a808"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;by&nbsp;$varname.&nbsp;That&nbsp;is,&nbsp;the&nbsp;policy&nbsp;regarding&nbsp;unresolved&nbsp;variable&nbsp;names&nbsp;will&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a809"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;applied&nbsp;to&nbsp;the&nbsp;variable&nbsp;$varname&nbsp;and&nbsp;the&nbsp;result&nbsp;returned.</span></div></li>
<li><div class="src-line"><a name="a810"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a811"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;a&nbsp;finished&nbsp;string&nbsp;derived&nbsp;from&nbsp;the&nbsp;variable&nbsp;$varname.</span></div></li>
<li><div class="src-line"><a name="a812"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a813"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;get(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a814"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a815"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;variable&nbsp;to&nbsp;finish</span></div></li>
<li><div class="src-line"><a name="a816"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a817"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span></div></li>
<li><div class="src-line"><a name="a818"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_unknowns</span></div></li>
<li><div class="src-line"><a name="a819"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;finish</span></div></li>
<li><div class="src-line"><a name="a820"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a821"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodget">get</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a822"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodfinish">finish</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodget_var">get_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a823"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a824"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a825"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a826"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a827"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;When&nbsp;called&nbsp;with&nbsp;a&nbsp;relative&nbsp;pathname,&nbsp;this&nbsp;function&nbsp;will&nbsp;return&nbsp;the&nbsp;pathname</span></div></li>
<li><div class="src-line"><a name="a828"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;with&nbsp;$this-&gt;root&nbsp;prepended.&nbsp;Absolute&nbsp;pathnames&nbsp;are&nbsp;returned&nbsp;unchanged.</span></div></li>
<li><div class="src-line"><a name="a829"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a830"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;a&nbsp;string&nbsp;containing&nbsp;an&nbsp;absolute&nbsp;pathname.</span></div></li>
<li><div class="src-line"><a name="a831"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a832"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;filename(string&nbsp;$filename)</span></div></li>
<li><div class="src-line"><a name="a833"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a834"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$filename&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;a&nbsp;filename</span></div></li>
<li><div class="src-line"><a name="a835"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a836"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;string</span></div></li>
<li><div class="src-line"><a name="a837"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_root</span></div></li>
<li><div class="src-line"><a name="a838"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a839"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodfilename">filename</a><span class="src-sym">(</span><span class="src-var">$filename</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a840"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a841"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;filename:&lt;/b&gt;&nbsp;filename&nbsp;=&nbsp;<span class="src-var">$filename</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a842"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a843"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$filename</span><span class="src-sym">,&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-num">1</span><span class="src-sym">)&nbsp;</span>!=&nbsp;<span class="src-str">&quot;/&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a844"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$filename&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$root">root</a>.<span class="src-str">&quot;/&quot;</span>.<span class="src-var">$filename</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a845"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a846"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a847"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/file_exists">file_exists</a><span class="src-sym">(</span><span class="src-var">$filename</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a848"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodhalt">halt</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">filename:&nbsp;file&nbsp;<span class="src-var">$filename</span>&nbsp;does&nbsp;not&nbsp;exist.</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a849"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a850"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$filename</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a851"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a852"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a853"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a854"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a855"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;will&nbsp;construct&nbsp;a&nbsp;regexp&nbsp;for&nbsp;a&nbsp;given&nbsp;variable&nbsp;name&nbsp;with&nbsp;any</span></div></li>
<li><div class="src-line"><a name="a856"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;special&nbsp;chars&nbsp;quoted.</span></div></li>
<li><div class="src-line"><a name="a857"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a858"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;a&nbsp;string&nbsp;containing&nbsp;an&nbsp;escaped&nbsp;variable&nbsp;name.</span></div></li>
<li><div class="src-line"><a name="a859"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a860"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;varname(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a861"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a862"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;a&nbsp;variable&nbsp;name</span></div></li>
<li><div class="src-line"><a name="a863"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a864"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;string</span></div></li>
<li><div class="src-line"><a name="a865"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a866"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodvarname">varname</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a867"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/preg_quote">preg_quote</a><span class="src-sym">(</span><span class="src-str">&quot;{&quot;</span>.<span class="src-var">$varname</span>.<span class="src-str">&quot;}&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a868"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a869"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a870"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a871"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a872"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;If&nbsp;a&nbsp;variable's&nbsp;value&nbsp;is&nbsp;undefined&nbsp;and&nbsp;the&nbsp;variable&nbsp;has&nbsp;a&nbsp;filename&nbsp;stored&nbsp;in</span></div></li>
<li><div class="src-line"><a name="a873"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;$this-&gt;file[$varname]&nbsp;then&nbsp;the&nbsp;backing&nbsp;file&nbsp;will&nbsp;be&nbsp;loaded&nbsp;and&nbsp;the&nbsp;file's</span></div></li>
<li><div class="src-line"><a name="a874"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;contents&nbsp;will&nbsp;be&nbsp;assigned&nbsp;as&nbsp;the&nbsp;variable's&nbsp;value.</span></div></li>
<li><div class="src-line"><a name="a875"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a876"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Note&nbsp;that&nbsp;the&nbsp;behaviour&nbsp;of&nbsp;this&nbsp;function&nbsp;changed&nbsp;slightly&nbsp;after&nbsp;the&nbsp;7.2d</span></div></li>
<li><div class="src-line"><a name="a877"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;release.&nbsp;Where&nbsp;previously&nbsp;a&nbsp;variable&nbsp;was&nbsp;reloaded&nbsp;from&nbsp;file&nbsp;if&nbsp;the&nbsp;value</span></div></li>
<li><div class="src-line"><a name="a878"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;was&nbsp;empty,&nbsp;now&nbsp;this&nbsp;is&nbsp;not&nbsp;done.&nbsp;This&nbsp;allows&nbsp;a&nbsp;variable&nbsp;to&nbsp;be&nbsp;loaded&nbsp;then</span></div></li>
<li><div class="src-line"><a name="a879"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;set&nbsp;to&nbsp;&quot;&quot;,&nbsp;and&nbsp;also&nbsp;prevents&nbsp;attempts&nbsp;to&nbsp;load&nbsp;empty&nbsp;variables.&nbsp;Files&nbsp;are</span></div></li>
<li><div class="src-line"><a name="a880"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;now&nbsp;only&nbsp;loaded&nbsp;if&nbsp;$this-&gt;varvals[$varname]&nbsp;is&nbsp;unset.</span></div></li>
<li><div class="src-line"><a name="a881"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a882"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;true&nbsp;on&nbsp;success,&nbsp;false&nbsp;on&nbsp;error.</span></div></li>
<li><div class="src-line"><a name="a883"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a884"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;loadfile(string&nbsp;$varname)</span></div></li>
<li><div class="src-line"><a name="a885"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a886"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$varname&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;the&nbsp;name&nbsp;of&nbsp;a&nbsp;variable&nbsp;to&nbsp;load</span></div></li>
<li><div class="src-line"><a name="a887"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a888"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;boolean</span></div></li>
<li><div class="src-line"><a name="a889"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set_file</span></div></li>
<li><div class="src-line"><a name="a890"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a891"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodloadfile">loadfile</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a892"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a893"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;loadfile:&lt;/b&gt;&nbsp;varname&nbsp;=&nbsp;<span class="src-var">$varname</span>&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a894"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a895"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a896"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$file">file</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a897"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;$varname&nbsp;does&nbsp;not&nbsp;reference&nbsp;a&nbsp;file&nbsp;so&nbsp;return</span></div></li>
<li><div class="src-line"><a name="a898"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a899"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;loadfile:&lt;/b&gt;&nbsp;varname&nbsp;<span class="src-var">$varname</span>&nbsp;does&nbsp;not&nbsp;reference&nbsp;a&nbsp;file&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a900"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a901"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a902"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a903"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a904"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$varvals">varvals</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a905"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;will&nbsp;only&nbsp;be&nbsp;unset&nbsp;if&nbsp;varname&nbsp;was&nbsp;created&nbsp;with&nbsp;set_file&nbsp;and&nbsp;has&nbsp;never&nbsp;been&nbsp;loaded</span></div></li>
<li><div class="src-line"><a name="a906"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;$varname&nbsp;has&nbsp;already&nbsp;been&nbsp;loaded&nbsp;so&nbsp;return</span></div></li>
<li><div class="src-line"><a name="a907"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a908"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;</span><span class="src-str">&lt;p&gt;&lt;b&gt;loadfile:&lt;/b&gt;&nbsp;varname&nbsp;<span class="src-var">$varname</span>&nbsp;is&nbsp;already&nbsp;loaded&lt;/p&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a909"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a910"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a911"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a912"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$filename&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$file">file</a><span class="src-sym">[</span><span class="src-var">$varname</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a913"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a914"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">/*&nbsp;use&nbsp;@file&nbsp;here&nbsp;to&nbsp;avoid&nbsp;leaking&nbsp;filesystem&nbsp;information&nbsp;if&nbsp;there&nbsp;is&nbsp;an&nbsp;error&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a915"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$str&nbsp;</span>=&nbsp;<a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">&quot;&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-sym">@</span><a href="http://www.php.net/file">file</a><span class="src-sym">(</span><span class="src-var">$filename</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a916"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$str</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a917"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodhalt">halt</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">loadfile:&nbsp;While&nbsp;loading&nbsp;<span class="src-var">$varname</span>,&nbsp;<span class="src-var">$filename</span>&nbsp;does&nbsp;not&nbsp;exist&nbsp;or&nbsp;is&nbsp;empty.</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a918"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a919"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a920"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a921"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$debug">debug</a>&nbsp;<span class="src-sym">&amp;&nbsp;</span><span class="src-num">4</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a922"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">&lt;b&gt;loadfile:&lt;/b&gt;&nbsp;loaded&nbsp;<span class="src-var">$filename</span>&nbsp;into&nbsp;<span class="src-var">$varname</span>&lt;br&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a923"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a924"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodset_var">set_var</a><span class="src-sym">(</span><span class="src-var">$varname</span><span class="src-sym">,&nbsp;</span><span class="src-var">$str</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a925"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a926"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a927"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a928"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a929"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a930"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a931"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;is&nbsp;called&nbsp;whenever&nbsp;an&nbsp;error&nbsp;occurs&nbsp;and&nbsp;will&nbsp;handle&nbsp;the&nbsp;error</span></div></li>
<li><div class="src-line"><a name="a932"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;according&nbsp;to&nbsp;the&nbsp;policy&nbsp;defined&nbsp;in&nbsp;$this-&gt;halt_on_error.&nbsp;Additionally&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a933"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;error&nbsp;message&nbsp;will&nbsp;be&nbsp;saved&nbsp;in&nbsp;$this-&gt;last_error.</span></div></li>
<li><div class="src-line"><a name="a934"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a935"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Returns:&nbsp;always&nbsp;returns&nbsp;false.</span></div></li>
<li><div class="src-line"><a name="a936"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a937"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;halt(string&nbsp;$msg)</span></div></li>
<li><div class="src-line"><a name="a938"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a939"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$msg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;an&nbsp;error&nbsp;message</span></div></li>
<li><div class="src-line"><a name="a940"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;private</span></div></li>
<li><div class="src-line"><a name="a941"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span></div></li>
<li><div class="src-line"><a name="a942"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$halt_on_error</span></div></li>
<li><div class="src-line"><a name="a943"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a944"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodhalt">halt</a><span class="src-sym">(</span><span class="src-var">$msg</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a945"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$last_error">last_error</a>&nbsp;=&nbsp;<span class="src-var">$msg</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a946"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a947"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$halt_on_error">halt_on_error</a>&nbsp;!=&nbsp;<span class="src-str">&quot;no&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a948"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#methodhaltmsg">haltmsg</a><span class="src-sym">(</span><span class="src-var">$msg</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a949"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a950"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a951"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../Templates/PHPLib/Template.html#var$halt_on_error">halt_on_error</a>&nbsp;==&nbsp;<span class="src-str">&quot;yes&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a952"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">die</span><span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;Halted.&lt;/b&gt;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a953"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a954"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a955"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a956"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a957"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a958"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a959"></a>&nbsp;<span class="src-comm">/******************************************************************************</span></div></li>
<li><div class="src-line"><a name="a960"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;prints&nbsp;an&nbsp;error&nbsp;message.</span></div></li>
<li><div class="src-line"><a name="a961"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;It&nbsp;can&nbsp;be&nbsp;overridden&nbsp;by&nbsp;your&nbsp;subclass&nbsp;of&nbsp;Template.&nbsp;It&nbsp;will&nbsp;be&nbsp;called&nbsp;with&nbsp;an</span></div></li>
<li><div class="src-line"><a name="a962"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;error&nbsp;message&nbsp;to&nbsp;display.</span></div></li>
<li><div class="src-line"><a name="a963"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a964"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;usage:&nbsp;haltmsg(string&nbsp;$msg)</span></div></li>
<li><div class="src-line"><a name="a965"></a><span class="src-comm">&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a966"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@param&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$msg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;containing&nbsp;the&nbsp;error&nbsp;message&nbsp;to&nbsp;display</span></div></li>
<li><div class="src-line"><a name="a967"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@access&nbsp;&nbsp;&nbsp;&nbsp;public</span></div></li>
<li><div class="src-line"><a name="a968"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@return&nbsp;&nbsp;&nbsp;&nbsp;void</span></div></li>
<li><div class="src-line"><a name="a969"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;@see&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;halt</span></div></li>
<li><div class="src-line"><a name="a970"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a971"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../Templates/PHPLib/Template.html#methodhaltmsg">haltmsg</a><span class="src-sym">(</span><span class="src-var">$msg</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a972"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;&lt;b&gt;Template&nbsp;Error:&lt;/b&gt;&nbsp;%s&lt;br&gt;\n&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$msg</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a973"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a974"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a975"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a976"></a><span class="src-php">?&gt;</span></div></li>
</ol></div>
</div>
	<p class="notes" id="credit">
		Documentation generated on Tue, 02 Mar 2010 07:47:14 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</body>
</html>